package samples.d2.shapes 
{
	import flash.filters.DropShadowFilter;
	import flash.filters.GlowFilter;
	import flash.geom.Rectangle;
	import flash.utils.setInterval;
	import samples.BaseSample;
	import shapes.shapes2D.distribution.goldenRatio.GoldenRatio;
	import shapes.shapes2D.distribution.Grid;
	import shapes.shapes2D.Dot;
	import shapes.shapes2D.Square;
	
	/**
	 * @author Nicolas Barradeau
	 * http://en.nicoptere.net
	 */
	public class Square4 extends BaseSample
	{
		private var s:Square;
		public function Square4() 
		{
			
			s = new Square(0, 0, 0);
			reset();
			//setInterval( reset, 10 );
			
		}
		
		private function reset():void
		{
			
			graphics.clear();
			graphics.lineStyle( 0,color );
			var i:int;
			for (i = 100; i < sw - 100; i+=30 )
			{
				
				pattern( i, sh / 2, 30 );
				
			}
		}
		
		private function pattern( x:Number, y:Number, size:Number = 10  ):void
		{
			
			s.size = size;

			s.x = x;
			s.y = y;
			s.draw( graphics );

			s.x = x + size / 2;
			s.y = y - size;
			s.draw( graphics );
			
			s.x = x + size / 2;
			s.y = y + size;
			s.draw( graphics );
			
		}
		
	}

}